﻿using ReadAndWrite;
using GeneralServices.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WpfApplication1
{
    public partial class EMB_EMBALLAGE : EntityModel, ISerializableCSV
    {
        public EMB_EMBALLAGE()
        {
            CODE_EMBALLAGE = String.Empty;
            ATELIER = String.Empty;
            TOP_ACTIF = "N";
            TOP_EMBA_AVEC_HAUTEUR = "N";
            TOP_COUVERCLE = "N";
            FLUX_UTILISATION = String.Empty;
            CODE_PLAN = String.Empty;
            OBSERVATION = String.Empty;
            MARCHE = String.Empty;
            IMAGE_EMBALLAGE = null;
        }

        public override string ToString()
        {
            return CODE_EMBALLAGE + "/" + ATELIER;
        }

        public List<object> exposeAttributes()
        {
            List<object> l = new List<object>();
            l.Add(CODE_EMBALLAGE);
            l.Add(ATELIER);
            l.Add(TOP_ACTIF);
            l.Add(TOP_EMBA_AVEC_HAUTEUR);
            l.Add(TOP_COUVERCLE);
            l.Add(FLUX_UTILISATION); 
            l.Add(CODE_PLAN);
            l.Add(OBSERVATION);
            l.Add(MARCHE);
            return l;
        }

        public bool importAttributes(string[] data)
        {
            return true;
        }

        public string exposeHeader(string separateur)
        {
            return "";
        }

        public override object[] GetPrimaryKey()
        {
            return new object[] { CODE_EMBALLAGE, ATELIER };
        }
    }
}
